package data;
/*
 * @author: David Knodt
 */

public class Player {

	private String name;
	private int points;
	private int buzzerKeyCode;
	private boolean enabled = true;
	
	public Player(){}


	public Player(String name, int points, int buzzerKeyCode, boolean enabled) {
		this.name = name;
		this.points = points;
		this.buzzerKeyCode = buzzerKeyCode;
		this.enabled = enabled;
	}


	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getPoints() {
		return points;
	}
	public void setPoints(int points) {
		this.points = points;
	}
	public int getBuzzerKeyCode() {
		return buzzerKeyCode;
	}
	public void setBuzzerKeyCode(int keyCode) {
		this.buzzerKeyCode = keyCode;
	}
	public boolean isEnabled() {
		return enabled;
	}
	public void setEnabled(boolean enabled) {
		this.enabled = enabled;
	}
	
	@Override
	public boolean equals(Object obj) {
		if(obj != null && obj instanceof Player){
			if(this.name.equals(((Player)obj).name) && this.points == ((Player)obj).points
				&& this.buzzerKeyCode == ((Player)obj).buzzerKeyCode
				&& this.points == ((Player)obj).points
				&& this.enabled == ((Player)obj).enabled)return true;
		}
	return false;
	}

}
